﻿using Common.Buffer;
using SuperSocket.SocketBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common.Server
{
    public class MapleSession : AppSession<MapleSession, MpaleRequestInfo>
    {
        public void Send(MaplePacket write)
        {
            Send(write.getBytes(), 0, write.getBytes().Length);
        }

        protected override void OnSessionStarted()
        {
            base.OnSessionStarted();
        }

        protected override void HandleException(Exception e)
        {
            base.HandleException(e);
        }

        public string GetSessionID()
        {
            return this.SessionID;
        }

        public override string ToString()
        {
            return "ID:"+this.SessionID+" --- IP:"+this.RemoteEndPoint.Address+":"+this.RemoteEndPoint.Port;
        }
    }
}
